<?php
 /******************************************************************************
 *   GunCMS is an avid supporter of open source software. This is the appropriate 
 *   option if you are creating an open source application with a license 
 *   compatible with the GNU GPL license v3.
 *   For details http://www.gnu.org/licenses/gpl.html
 *   DO NOT USE FOR COMMERCIAL WITHOUT PERMISSION
 *
 * GunCMS Version 1.0.3
 * Copyright(c) 2009-2010, T & L GdbR
 * info@guncms.de
 * 
 * http://www.guncms.de
 ********************************************************************************/
class BgcmsConfigManagerBean {
	
	 public function __construct() {
	  //
	 }
		
	 public function __destruct() {
		//
	 }
	  
	 public static function get_all_config_data($db) {
        $strSQL = sprintf("SELECT * FROM %s", TBL_CONFIG_MANAGER);
        return $db->get_results($strSQL);
	}
	
	public static function update_config_data($db,$cfgkey, $cfgvalue) {
    	$sql = sprintf("UPDATE %s SET " .
    			"value = '%s' " .
    			"WHERE config_key = '". $cfgkey ."'", TBL_CONFIG_MANAGER,
    			$cfgvalue);
    	$res = $db->query($sql) >= 0;

    	return $res;
	}
}
?>